<ion-view class="bg">
  <ion-header-bar class="bar bar-positive">
    <button class="button back-button buttons icon ion-ios-arrow-left button-clear" nav-direction="back" ui-sref="tab.workbench">返回</button>
    <h3 class="title">回单寄出</h3>
    <button class="button button-icon icon ion-ios-search" ng-click="modal.show()"></button>
  </ion-header-bar>
  <ion-content>
    <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
    <div ng-if="showloading" class="ion-spinner">
      <ion-spinner icon="lines" class="spinner-calm"></ion-spinner>
    </div>
    <ion-list class="myList" ng-if="showloading == false">
      <h5 ng-if="receiptData==''" class="notFound">未找到数据</h5>
      <li class="item li" ng-click="goDetail(data.CYD_ID,data.WAYBILL_STATUS)" ng-repeat="data in receiptData">
        <div>
          <i>承运单号</i>
          <i class="value" style="color: #ff9800">{{data.WAYBILL_NO}}</i>
        </div>
        <img src="img/receiptState-{{data.RECEIPT_STATUS}}.png" class="stateImg">
        <div>
          <i>承运日期</i>
          <i class="value">{{data.WAYBILL_DATE | date : "yyyy年MM月dd日"}}</i>
        </div>
        <div>
          <i class="balanced">{{data.DEPARTURE_STATION}}</i>
          <i class="ion-arrow-right-a value arrow-right" ng-if="data.DESTINATION_NAME!=null"></i>
          <i class="value assertive">{{data.DESTINATION_NAME}}</i>
          <i class="ion-arrow-right-a value arrow-right" ng-if="data.DESTINATION_STATION!=null"></i>
          <i class="value energized">{{data.DESTINATION_STATION}}</i>
        </div>
        <div>
          <i>回单份数</i>
          <i class="value">{{data.RECEIPT_NUM}}</i>
        </div>
        <div>
          <i>发货人</i>
          <i class="value">{{data.SHIPPER}}</i>
        </div>
        <div class="btnDiv">
          <button class="button button-positive longButton" ng-click="mail(data.ID);$event.stopPropagation();">回单寄出</button>
        </div>
      </li>
    </ion-list>
  </ion-content>
</ion-view>
